$(document).ready(function(){
	$('.popdlg_btn').click(function(){
		var me = $(this),
			offset = me.offset(),
			dataTarget = me.attr('data-target'),
			popdlg = $(dataTarget),
			width = popdlg.width(),
			height = popdlg.height(),
			left = ($(window).width()-width)/2,
			top = ($(window).height()-height)/2;
		var animateInit = {
			top:offset.top,
			left:offset.left,
			width:0,
			height:0
		},
		attrs = {
			top:top,
			left:left,
			width:width,
			height:height
		};
		var mask = '<div class="mask"></div>';
		$(mask).prependTo($('body')).css('z-index','999');
		popdlg.css(animateInit).show().animate(attrs,350,"linear");
	});
	
	$('.close_title_hbx_a').click(function(){
		var me = $(this);
		me.parent().fadeOut(function(){
			$('.mask').remove();
		});
	});
	
	$('.music_control_btn').click(function(){
		var me = $(this);
		var src = me.find('img').attr('src'),
			src_prefix = src.split('/')[0],
			src_origin = src.split('/')[1],
			src_new;
		if('pause.png' == src_origin){
			src_new = 'do.png';
		}else{
			src_new = 'pause.png';
		}
		
		me.find('img').attr('src',src_prefix+'/'+src_new);
	});
	
	// IE下浏览器兼容性
	if($.browser.msie){
		$('div.zq_img img').css({
			'margin-top':'2px',
			'margin-left':'-2px'
		});
		$('.img_float_bg').css({
			'margin-top':'2px',
			'margin-left':'-2px'
		});
		$('.content_img_area img').css({
			'margin-top':'1px',
			'margin-left':'1px'
		});
	}else if($.browser.mozilla){
		$('footer').css('margin-top','100px');
		$('.func_area').css('overflow','hidden');
		$('.zq_img img').css({
			'margin-left':'0px'
		});
	}else{
		$('.zq_img img').css({
			'margin-left':'0px'
		});
	}
	
	
});